package com.zhyl.demo.service.impl;

import com.zhyl.demo.entity.HospitalAddress;
import com.zhyl.demo.mapper.HospitalAddressMapper;
import com.zhyl.demo.service.HospitalAddressService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;

/**
 * @author yang3
 */
@Service
public class HospitalAddressServiceImpl implements HospitalAddressService {
    private final HospitalAddressMapper hospitalAddressMapper;
    @Autowired
    private HospitalAddressServiceImpl(HospitalAddressMapper hospitalAddressMapper){
        this.hospitalAddressMapper = hospitalAddressMapper;
    }

    @Override
    public ArrayList<HospitalAddress> getHospitalData() {
        ArrayList<HospitalAddress> hospitalData = hospitalAddressMapper.getHospitalData();
        if (hospitalData!=null){
            return hospitalData;
        }else {
            return null;
        }
    }
}
